<throw> element 

The <throw> element declares a throw task, indicating that an exception should be raised. Values may be sent to the exception handler with <send> elements included in the throw. Throwing an exception terminates the current context and causes the context to be destroyed, including any variable and history state contained in the context.

If the parent context does not contain an exception handler (a <catch> element) that matches this exception, the parent context is terminated and the exception re-thrown. This operation repeats until an exception handler is found or all contexts have been terminated. In the case where all contexts are terminated, the UP.Browser performs a reset to a predictable state.

For example, the following throws an exception with the name "user input error". In addition, a parameter block is included specifying more information about the error.

syntax

Attributes

 
name Specifies the name of the exception. This name is used to find the correct handler for the exception. The name attribute value is case sensitive.